package com.example.java8demo.consumerDemo;


import java.util.function.Consumer;

/**
 *  传入参数，没有返回结果
 *
 * @author tianzhuang
 * @version 1.0
 * @date 2022/1/18 00:01
 */
public class ConDemo {
    public static void sout1(Integer val) {
        System.out.println(val+1);
    }
    public static void test() {
        Consumer<Integer> consumer = o -> sout1(o);
        consumer.accept(10);
    }
    public static void main(String[] args) {
        ConDemo.test();
    }
}
